package com.qingcheng.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.qingcheng.pojo.comment.AllComment;
import com.qingcheng.service.comment.CommentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import com.qingcheng.service.comment.CommentService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/comment")
public class CommentController {
    @Reference
    private CommentService commentService;

    @GetMapping("/sort")
    public List<AllComment> sort(String skuId) {

        return commentService.sort(skuId);


    @PostMapping("/sort")
    public List<Map<String, Object>> sort(@RequestBody Map searchMap){
        return commentService.sort(searchMap);
    }
}
